package com.yk.govpro.model;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by zsyoung on 2017/5/24.
 */
@Entity
@Table(name = "noticelist", schema = "govpro", catalog = "")
public class NoticelistEntity {
    private String noticeId;
    private Integer noticeType;
    private Integer state;
    private String creatorOrgName;
    private String agentName;
    private String buyerName;
    private String districtName;
    private Timestamp bidBeginTime;
    private Timestamp bidEndTime;
    private Integer isIssue;
    private Timestamp issueTime;
    private String lastModify;
    private Timestamp openBidTime;
    private Integer packageNum;
    private Double projectBudget;
    private String projectDirectoryCode;
    private String projectDirectoryName;
    private Integer projectPurchaseWay;
    private String title;
    private Double zbje;

    @Id
    @Column(name = "notice_id", nullable = false, length = 255)
    public String getNoticeId() {
        return noticeId;
    }

    public void setNoticeId(String noticeId) {
        this.noticeId = noticeId;
    }

    @Basic
    @Column(name = "noticeType", nullable = true)
    public Integer getNoticeType() {
        return noticeType;
    }

    public void setNoticeType(Integer noticeType) {
        this.noticeType = noticeType;
    }

    @Basic
    @Column(name = "state", nullable = true)
    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Basic
    @Column(name = "creatorOrgName", nullable = true, length = 255)
    public String getCreatorOrgName() {
        return creatorOrgName;
    }

    public void setCreatorOrgName(String creatorOrgName) {
        this.creatorOrgName = creatorOrgName;
    }

    @Basic
    @Column(name = "agentName", nullable = true, length = 255)
    public String getAgentName() {
        return agentName;
    }

    public void setAgentName(String agentName) {
        this.agentName = agentName;
    }

    @Basic
    @Column(name = "buyerName", nullable = true, length = 255)
    public String getBuyerName() {
        return buyerName;
    }

    public void setBuyerName(String buyerName) {
        this.buyerName = buyerName;
    }

    @Basic
    @Column(name = "districtName", nullable = true, length = 255)
    public String getDistrictName() {
        return districtName;
    }

    public void setDistrictName(String districtName) {
        this.districtName = districtName;
    }

    @Basic
    @Column(name = "bidBeginTime", nullable = true)
    public Timestamp getBidBeginTime() {
        return bidBeginTime;
    }

    public void setBidBeginTime(Timestamp bidBeginTime) {
        this.bidBeginTime = bidBeginTime;
    }

    @Basic
    @Column(name = "bidEndTime", nullable = true)
    public Timestamp getBidEndTime() {
        return bidEndTime;
    }

    public void setBidEndTime(Timestamp bidEndTime) {
        this.bidEndTime = bidEndTime;
    }

    @Basic
    @Column(name = "isIssue", nullable = true)
    public Integer getIsIssue() {
        return isIssue;
    }

    public void setIsIssue(Integer isIssue) {
        this.isIssue = isIssue;
    }

    @Basic
    @Column(name = "issueTime", nullable = true)
    public Timestamp getIssueTime() {
        return issueTime;
    }

    public void setIssueTime(Timestamp issueTime) {
        this.issueTime = issueTime;
    }

    @Basic
    @Column(name = "lastModify", nullable = true)
    public String getLastModify() {
        return lastModify;
    }

    public void setLastModify(String lastModify) {
        this.lastModify = lastModify;
    }

    @Basic
    @Column(name = "openBidTime", nullable = true)
    public Timestamp getOpenBidTime() {
        return openBidTime;
    }

    public void setOpenBidTime(Timestamp openBidTime) {
        this.openBidTime = openBidTime;
    }

    @Basic
    @Column(name = "packageNum", nullable = true)
    public Integer getPackageNum() {
        return packageNum;
    }

    public void setPackageNum(Integer packageNum) {
        this.packageNum = packageNum;
    }

    @Basic
    @Column(name = "projectBudget", nullable = true, precision = 0)
    public Double getProjectBudget() {
        return projectBudget;
    }

    public void setProjectBudget(Double projectBudget) {
        this.projectBudget = projectBudget;
    }

    @Basic
    @Column(name = "projectDirectoryCode", nullable = true, length = 255)
    public String getProjectDirectoryCode() {
        return projectDirectoryCode;
    }

    public void setProjectDirectoryCode(String projectDirectoryCode) {
        this.projectDirectoryCode = projectDirectoryCode;
    }

    @Basic
    @Column(name = "projectDirectoryName", nullable = true, length = 255)
    public String getProjectDirectoryName() {
        return projectDirectoryName;
    }

    public void setProjectDirectoryName(String projectDirectoryName) {
        this.projectDirectoryName = projectDirectoryName;
    }

    @Basic
    @Column(name = "projectPurchaseWay", nullable = true)
    public Integer getProjectPurchaseWay() {
        return projectPurchaseWay;
    }

    public void setProjectPurchaseWay(Integer projectPurchaseWay) {
        this.projectPurchaseWay = projectPurchaseWay;
    }

    @Basic
    @Column(name = "title", nullable = true, length = 255)
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "zbje", nullable = true, precision = 0)
    public Double getZbje() {
        return zbje;
    }

    public void setZbje(Double zbje) {
        this.zbje = zbje;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        NoticelistEntity that = (NoticelistEntity) o;

        if (noticeId != null ? !noticeId.equals(that.noticeId) : that.noticeId != null) return false;
        if (noticeType != null ? !noticeType.equals(that.noticeType) : that.noticeType != null) return false;
        if (state != null ? !state.equals(that.state) : that.state != null) return false;
        if (creatorOrgName != null ? !creatorOrgName.equals(that.creatorOrgName) : that.creatorOrgName != null)
            return false;
        if (agentName != null ? !agentName.equals(that.agentName) : that.agentName != null) return false;
        if (buyerName != null ? !buyerName.equals(that.buyerName) : that.buyerName != null) return false;
        if (districtName != null ? !districtName.equals(that.districtName) : that.districtName != null) return false;
        if (bidBeginTime != null ? !bidBeginTime.equals(that.bidBeginTime) : that.bidBeginTime != null) return false;
        if (bidEndTime != null ? !bidEndTime.equals(that.bidEndTime) : that.bidEndTime != null) return false;
        if (isIssue != null ? !isIssue.equals(that.isIssue) : that.isIssue != null) return false;
        if (issueTime != null ? !issueTime.equals(that.issueTime) : that.issueTime != null) return false;
        if (lastModify != null ? !lastModify.equals(that.lastModify) : that.lastModify != null) return false;
        if (openBidTime != null ? !openBidTime.equals(that.openBidTime) : that.openBidTime != null) return false;
        if (packageNum != null ? !packageNum.equals(that.packageNum) : that.packageNum != null) return false;
        if (projectBudget != null ? !projectBudget.equals(that.projectBudget) : that.projectBudget != null)
            return false;
        if (projectDirectoryCode != null ? !projectDirectoryCode.equals(that.projectDirectoryCode) : that.projectDirectoryCode != null)
            return false;
        if (projectDirectoryName != null ? !projectDirectoryName.equals(that.projectDirectoryName) : that.projectDirectoryName != null)
            return false;
        if (projectPurchaseWay != null ? !projectPurchaseWay.equals(that.projectPurchaseWay) : that.projectPurchaseWay != null)
            return false;
        if (title != null ? !title.equals(that.title) : that.title != null) return false;
        if (zbje != null ? !zbje.equals(that.zbje) : that.zbje != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = noticeId != null ? noticeId.hashCode() : 0;
        result = 31 * result + (noticeType != null ? noticeType.hashCode() : 0);
        result = 31 * result + (state != null ? state.hashCode() : 0);
        result = 31 * result + (creatorOrgName != null ? creatorOrgName.hashCode() : 0);
        result = 31 * result + (agentName != null ? agentName.hashCode() : 0);
        result = 31 * result + (buyerName != null ? buyerName.hashCode() : 0);
        result = 31 * result + (districtName != null ? districtName.hashCode() : 0);
        result = 31 * result + (bidBeginTime != null ? bidBeginTime.hashCode() : 0);
        result = 31 * result + (bidEndTime != null ? bidEndTime.hashCode() : 0);
        result = 31 * result + (isIssue != null ? isIssue.hashCode() : 0);
        result = 31 * result + (issueTime != null ? issueTime.hashCode() : 0);
        result = 31 * result + (lastModify != null ? lastModify.hashCode() : 0);
        result = 31 * result + (openBidTime != null ? openBidTime.hashCode() : 0);
        result = 31 * result + (packageNum != null ? packageNum.hashCode() : 0);
        result = 31 * result + (projectBudget != null ? projectBudget.hashCode() : 0);
        result = 31 * result + (projectDirectoryCode != null ? projectDirectoryCode.hashCode() : 0);
        result = 31 * result + (projectDirectoryName != null ? projectDirectoryName.hashCode() : 0);
        result = 31 * result + (projectPurchaseWay != null ? projectPurchaseWay.hashCode() : 0);
        result = 31 * result + (title != null ? title.hashCode() : 0);
        result = 31 * result + (zbje != null ? zbje.hashCode() : 0);
        return result;
    }
}
